package passwordmanagement;

import java.util.Random;

public class PasswordGenerator {
    private static final String Characters="ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
            "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+";
    Random r=new Random();
    int length=6+r.nextInt(8);
    StringBuilder password = new StringBuilder(length);
    public StringBuilder password(){
        for (int i = 0; i < length; i++) {
            int index = r.nextInt(Characters.length());
            password.append(Characters.charAt(index));
        }
        return password;
    }
}
